/* Bootstrap 5集成样式 - 增强版 */

/* 通用样式覆盖 */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container-fluid {
    max-width: 1700px;
}

/* 导航栏样式 */
.navbar-custom {
    background-color: #343a40;
    border-bottom: 1px solid #dee2e6;
}

.navbar-brand {
    font-weight: 500;
    font-size: 1.2rem;
}

.nav-link {
    font-weight: 400;
    padding: 0.5rem 1rem;
}

.nav-link:hover {
    color: #fff !important;
    background-color: rgba(255,255,255,0.1);
}

.nav-link.active {
    background-color: #495057 !important;
}

/* 页面内容区域 */
.main-content {
    background: white;
    border: 1px solid #dee2e6;
    margin-top: 1rem;
    padding: 1.5rem;
}

.page-header {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
}

.page-title {
    color: #212529;
    font-weight: 500;
    margin-bottom: 0;
    font-size: 1.25rem;
}

/* 搜索和操作栏 */
.search-section {
    background-color: #f8f9fa;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* 表格样式增强 */
.table-container {
    background: white;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.data-table {
    margin-bottom: 0;
    table-layout: fixed;
}

.data-table thead th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem;
    font-size: 0.95rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.data-table td {
    padding: 0.6rem 0.75rem;
    vertical-align: middle;
    border-color: #dee2e6;
    word-wrap: break-word;
    white-space: normal;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 列宽设置 */
.col-index { width: 60px; }
.col-supplier { width: 120px; }
.col-material-code { width: 120px; }
.col-material-name { width: 150px; }
.col-specification { width: 100px; }
.col-unit { width: 80px; }
.col-batch { width: 120px; }
.col-quantity { width: 100px; }
.col-arrival-date { width: 120px; }
.col-clone-number { width: 100px; }
.col-expiry-date { width: 120px; }
.col-actions { width: 120px; }

/* 按钮样式 */
.btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.25rem;
    font-weight: 400;
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
}

.search-btn {
    font-size: 0.8rem;
    padding: 0.6rem 1.2rem;
    min-width: 80px;
    height: 38px;
}

.btn-text {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-block;
    margin: 0 0.3rem 0 0;
    border: none;
    background: none;
    cursor: pointer;
}

.btn-edit {
    color: #0d6efd;
}

.btn-edit:hover {
    color: #0056b3;
    text-decoration: underline;
}

.btn-delete {
    color: #dc3545;
}

.btn-delete:hover {
    color: #a71e2a;
    text-decoration: underline;
}

.action-buttons-cell {
    white-space: nowrap;
}

/* 状态标签 */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

/* 分页样式 */
.pagination-container {
    background-color: #f8f9fa;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid #dee2e6;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.pagination {
    margin-bottom: 0;
    gap: 0.25rem;
}

.page-link {
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.375rem 0.75rem;
}

.page-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* 模态框增强 */
.modal-content {
    border: 1px solid #dee2e6;
}

.modal-header {
    background-color: #f8f9fa;
    color: #212529;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    font-weight: 500;
    font-size: 1.1rem;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    height: 40vh;
    overflow-y: auto;
}
.modal-body2 {
    padding: 1.5rem;
    max-height: 70vh;
    height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 400;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control, .form-select {
    border: 1px solid #ced4da;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 文件上传样式 */
.file-upload-area {
    border: 2px dashed #ced4da;
    padding: 1.5rem;
    text-align: center;
    background-color: #f8f9fa;
}

.file-upload-area:hover {
    border-color: #007bff;
}

.file-upload-icon {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .main-content {
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .search-section {
        padding: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table td, .data-table th {
        padding: 0.5rem 0.25rem;
    }
}

@media (max-width: 576px) {
    .btn-text {
        font-size: 0.75rem;
        padding: 0.125rem 0.25rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}